Wybierz wiadomości
<div id="messages">
    <div id="status">test</div>
    <table>
        <tr>
            <td>ID</td><td>Treść</td>
        </tr>
{foreach from=$messages key=myId item=i}
{strip}
        <tr bgcolor="{cycle values="#aaaaaa,#bbbbbb"}">
            <td>{$i.MessageId}</td>
            <td>
                <div id="popup" >
                    <a id="{$i.MessageId}">Podgląd
                        <span>
                    {$i.message_content}
                        </span>
                    </a>

                </div>
            </td>

        </tr>
        
{/strip}
{/foreach}
    </table>
</div>
{literal}<script type="text/javascript">
$(document).ready(function(){
       $("div#messages a").click(function(){
       $.post("index.php", { site: 'mailing', action: 'prepareMessage', MessageId: this.id},callForSite('mailing','main','createQue2') );
       
        });
});


</script>
{/literal}